package com.qfedu.smart_community.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName proprietor_info
 */
public class ProprietorInfo implements Serializable {
    /**
     * 业主id
     */
    private Integer id;

    /**
     * 楼栋单元
     */
    private String buildingUnit;

    /**
     * 房间号
     */
    private Integer roomId;

    /**
     * 业主姓名
     */
    private String name;

    /**
     * 业主电话
     */
    private String tel;

    /**
     * 绑定时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date bindingTime;

    /**
     * 首次缴费时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date initialPay;

    /**
     * 建筑面积㎡
     */
    private String floorArea;

    /**
     * 使用面积㎡
     */
    private String usableArea;

    private static final long serialVersionUID = 1L;

    /**
     * 业主id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 业主id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 楼栋单元
     */
    public String getBuildingUnit() {
        return buildingUnit;
    }

    /**
     * 楼栋单元
     */
    public void setBuildingUnit(String buildingUnit) {
        this.buildingUnit = buildingUnit;
    }

    /**
     * 房间号
     */
    public Integer getRoomId() {
        return roomId;
    }

    /**
     * 房间号
     */
    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    /**
     * 业主姓名
     */
    public String getName() {
        return name;
    }

    /**
     * 业主姓名
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 业主电话
     */
    public String getTel() {
        return tel;
    }

    /**
     * 业主电话
     */
    public void setTel(String tel) {
        this.tel = tel;
    }

    /**
     * 绑定时间
     */
    public Date getBindingTime() {
        return bindingTime;
    }

    /**
     * 绑定时间
     */
    public void setBindingTime(Date bindingTime) {
        this.bindingTime = bindingTime;
    }

    /**
     * 首次缴费时间
     */
    public Date getInitialPay() {
        return initialPay;
    }

    /**
     * 首次缴费时间
     */
    public void setInitialPay(Date initialPay) {
        this.initialPay = initialPay;
    }

    /**
     * 建筑面积㎡
     */
    public String getFloorArea() {
        return floorArea;
    }

    /**
     * 建筑面积㎡
     */
    public void setFloorArea(String floorArea) {
        this.floorArea = floorArea;
    }

    /**
     * 使用面积㎡
     */
    public String getUsableArea() {
        return usableArea;
    }

    /**
     * 使用面积㎡
     */
    public void setUsableArea(String usableArea) {
        this.usableArea = usableArea;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProprietorInfo other = (ProprietorInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBuildingUnit() == null ? other.getBuildingUnit() == null : this.getBuildingUnit().equals(other.getBuildingUnit()))
            && (this.getRoomId() == null ? other.getRoomId() == null : this.getRoomId().equals(other.getRoomId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getTel() == null ? other.getTel() == null : this.getTel().equals(other.getTel()))
            && (this.getBindingTime() == null ? other.getBindingTime() == null : this.getBindingTime().equals(other.getBindingTime()))
            && (this.getInitialPay() == null ? other.getInitialPay() == null : this.getInitialPay().equals(other.getInitialPay()))
            && (this.getFloorArea() == null ? other.getFloorArea() == null : this.getFloorArea().equals(other.getFloorArea()))
            && (this.getUsableArea() == null ? other.getUsableArea() == null : this.getUsableArea().equals(other.getUsableArea()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBuildingUnit() == null) ? 0 : getBuildingUnit().hashCode());
        result = prime * result + ((getRoomId() == null) ? 0 : getRoomId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getTel() == null) ? 0 : getTel().hashCode());
        result = prime * result + ((getBindingTime() == null) ? 0 : getBindingTime().hashCode());
        result = prime * result + ((getInitialPay() == null) ? 0 : getInitialPay().hashCode());
        result = prime * result + ((getFloorArea() == null) ? 0 : getFloorArea().hashCode());
        result = prime * result + ((getUsableArea() == null) ? 0 : getUsableArea().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", buildingUnit=").append(buildingUnit);
        sb.append(", roomId=").append(roomId);
        sb.append(", name=").append(name);
        sb.append(", tel=").append(tel);
        sb.append(", bindingTime=").append(bindingTime);
        sb.append(", initialPay=").append(initialPay);
        sb.append(", floorArea=").append(floorArea);
        sb.append(", usableArea=").append(usableArea);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}